package com.ywger.service.task;

import com.ywger.service.server.EnsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author chenmeng
 * @date 2021-11-14 17:48
 * @desc
 */
@Component
@Slf4j
public class RegisterTask {

    @Autowired
    private EnsService ensService;

    @Scheduled(cron = "0/10 * * * * ?")
    public void doRegister(){
        ensService.register();

    }

    @Scheduled(cron = "0 0/2 * * * ?")
    public void doPending(){
        ensService.dealPending();
    }
}
